package com.thssh.ui.lsn09;

import android.content.Context;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.thssh.ui.R;

public class ShowActivity extends AppCompatActivity {

    private static final String EXTRA_VIEW  = "extra_view";
    public static final int VIEW_BEZIER     = 0;
    public static final int VIEW_PATH_HELP  = 1;
    public static final int VIEW_TRASH      = 2;
    public static final int VIEW_WAVE       = 3;

    public static final void startShower(Context context, int viewType){
        Intent intent = new Intent(context, ShowActivity.class);
        intent.putExtra(EXTRA_VIEW, viewType);
        context.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        switch (getIntent().getIntExtra(EXTRA_VIEW, VIEW_BEZIER)){
            case VIEW_BEZIER:
                getSupportActionBar().setTitle(R.string.title_path_02);
                setContentView(R.layout.activity_show_bezier);
                break;
            case VIEW_PATH_HELP:
                getSupportActionBar().setTitle(R.string.title_path_01);
                setContentView(R.layout.activity_show_path_help);
                break;
            case VIEW_TRASH:
                getSupportActionBar().setTitle(R.string.title_path_04);
                setContentView(R.layout.activity_show_trash);
                break;
            case VIEW_WAVE:
                getSupportActionBar().setTitle(R.string.title_path_03);
                setContentView(R.layout.activity_show_wave);
                break;
        }
    }
}
